package com.ruoyi.sfproduct.mapper;

import java.util.List;
import com.ruoyi.sfproduct.domain.LwSfproduct;
import com.ruoyi.sfproduct.domain.vo.MaterialVo;
import org.apache.ibatis.annotations.Param;

/**
 * 半成品Mapper接口
 * 
 * @author sll
 * @date 2023-08-09
 */
public interface LwSfproductMapper 
{
    /**
     * 查询半成品
     * 
     * @param sfproductId 半成品主键
     * @return 半成品
     */
    public LwSfproduct selectLwSfproductBySfproductId(Long sfproductId);

    /**
     * 查询半成品元件清单
     *
     * @param sfproductId 半成品主键
     * @return 半成品元件清单
     */
    public List<MaterialVo> selectMaterialVoBySfproductId(Long sfproductId);

    /**
     * 查询半成品列表
     * 
     * @param lwSfproduct 半成品
     * @return 半成品集合
     */
    public List<LwSfproduct> selectLwSfproductList(LwSfproduct lwSfproduct);

    /**
     * 新增半成品
     * 
     * @param lwSfproduct 半成品
     * @return 结果
     */
    public int insertLwSfproduct(LwSfproduct lwSfproduct);

    /**
     * 修改半成品
     * 
     * @param lwSfproduct 半成品
     * @return 结果
     */
    public int updateLwSfproduct(LwSfproduct lwSfproduct);

    /**
     * 删除半成品
     * 
     * @param sfproductId 半成品主键
     * @return 结果
     */
    public int deleteLwSfproductBySfproductId(Long sfproductId);

    /**
     * 批量删除半成品
     * 
     * @param sfproductIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteLwSfproductBySfproductIds(Long[] sfproductIds);

    public MaterialVo selectMaterialAndSfproduct(@Param("sfproductId") Long sfproductId,@Param("materialId") Long materialId);

    int addMaterials(MaterialVo materialVo);

    int updateMaterials(MaterialVo materialVo);

    int delMaterial(@Param("sfproductId") Long sfproductId,@Param("materialId") Long materialId);

    List<MaterialVo> selectDatamaterialVoList();

    int overAgain(Long sfproductId);
}
